import re
import time

def now():
    return time.mktime(time.gmtime())

def date_time_to_timestamp(datetime):
        m = re.match('(\d\d\d\d)-(\d\d)-(\d\d)', datetime)
        return time.mktime((int(m.group(1)), 
                                int(m.group(2)),
                                int(m.group(3)),
                                0,
                                0,
                                0,0,0,0))
